940 REM The IBM Personal Computer Music
950 REM Version 1.10 (C)Copyright IBM Corp 1981, 1982
960 REM Licensed Material - Program Property of IBM
975 REM DEF SEG: POKE 106,0
980 SAMPLES$ = "NO"
990 GOTO 1010
1000 SAMPLES$ = "YES"
1010 SCREEN 0,1:COLOR 15,0,0:CLS:LOCATE 5,19,0:PRINT "IBM"
1020 LOCATE 7,12:PRINT "Personal Computer"
1030 COLOR 10,0:LOCATE 10,9:PRINT CHR$(213)+STRING$(21,205)+CHR$(184)
1040 LOCATE 11,9:PRINT CHR$(179)+"        MUSIC        "+CHR$(179)
1050 LOCATE 12,9:PRINT CHR$(179)+STRING$(21,32)+CHR$(179)
1060 LOCATE 13,9:PRINT CHR$(179)+"    Version 1.10     "+CHR$(179)
1070 LOCATE 14,9:PRINT CHR$(212)+STRING$(21,205)+CHR$(190)
1080 COLOR 15,0:LOCATE 17,4:PRINT "(C) Copyright IBM Corp 1981, 1982"
1090 COLOR 14,0:LOCATE 23,7:PRINT "Press space bar to continue"
1100 IF INKEY$ <> "" THEN  1100
1110 CMD$ = INKEY$:IF CMD$="" THEN 1110
1130 IF CMD$ = CHR$(27) THEN GOTO 1850
1140 IF CMD$ <> " " THEN 1110
1141 REM ON ERROR GOTO 1148
1142 PLAY "mf"
1143 GOTO 1149
1148 RESUME 1149
1149 REM ON ERROR GOTO 0
1150 SCREEN 0,1:COLOR 15,1,1:CLS: REM DEFINT A-Z
1160 LOCATE 15,7:PRINT " ------- selections -------"
1170 LOCATE 16,7:PRINT " A-MARCH  E-HUMOR  I-SAKURA"
1180 LOCATE 17,7:PRINT " B-STARS  F-BUG    J-BLUE  "
1190 LOCATE 18,7:PRINT " C-FORTY  G-POP    K-SCALES"
1191 LOCATE 19,7:PRINT " D-HAT    H-DANDY  ESC KEY-EXIT"
1200 COLOR 15,0
1210 FOR I=0 TO 15:FOR J=0 TO 8
1220 LOCATE 5+J,5+I*2:PRINT CHR$(219);CHR$(221);
1230 NEXT J:NEXT I
1240 FOR I=0 TO 12:FOR J=0 TO 4
1250 IF I=2 OR I=6 OR I=9 OR I=13 THEN 1270
1260 LOCATE 5+J,8+I*2:PRINT CHR$(32);CHR$(222);
1270 NEXT J:NEXT I
1280 FOR J=0 TO 9
1290 LOCATE 4+J,4:COLOR 4,0:PRINT CHR$(221);:LOCATE 4+J,36:COLOR 15,0
1300 PRINT CHR$(221);:COLOR 4,1:PRINT CHR$(221);
1310 NEXT J
1320 COLOR 4,1:LOCATE 4,4
1330 FOR I=0 TO 32:PRINT CHR$(219);:NEXT I
1340 PRINT CHR$(221);:LOCATE 13,4
1350 FOR I=0 TO 32:PRINT CHR$(219);:NEXT I
1360 PRINT CHR$(221);:COLOR 0,7:DIM M(88),O(70)
1370 FOR I=7 TO 88:M(I) =  36.8*(2^(1/12))^(I-6):NEXT I
1380 FOR I=0 TO 6:M(I) = 32767:NEXT I
1390 O(0) = 0
1400 O(39)=5:O(40)=7:O(41)=8:O(42)=9
1410 O(43)=10:O(44)=11:O(45)=13:O(46)=14
1420 O(47)=15:O(48)=16:O(49)=17:O(50)=18
1430 O(51)=19:O(52)=21:O(53)=22:O(54)=23
1440 O(55)=24:O(56)=25:O(57)=27:O(58)=28
1450 O(59)=29:O(60)=30:O(61)=31:O(62)=32
1460 O(63)=33:O(64)=35:O(65)=36:O(66)=37
1470 O(67)=38:O(68)=39:O(69)=40:O(70)=42
1480 GOTO 1630
1490 READ J,K
1500 CMD$ = INKEY$:IF CMD$="" THEN 1540
1510 IF CMD$=CHR$(27) THEN RETURN
1520 POKE 106,0
1530 REM
1540 IF J = -1  THEN RETURN
1550 Q = O(J)
1560 IF J>64 OR J<39 THEN 1590
1570 REM IF SCREEN(5,Q)<>32 THEN COLOR 0,7:LOCATE 11,Q:PRINT CHR$(14);:COLOR 15,0:GOTO 1590
1571 COLOR 0,7:LOCATE 11,Q:PRINT CHR$(14);:COLOR 15,0:GOTO 1590
1580 COLOR 15,0:LOCATE 7,Q:PRINT CHR$(14);:COLOR 0,7
1590 SOUND M(J),K:IF J=0 AND K=1 THEN 1600:'SKIP NEXT FOR STACCATTO
1595 SOUND 32767,1
1600 IF J>64 OR J<39 THEN 1490
1620 COLOR 15,0:LOCATE 11,Q:PRINT CHR$(219);:GOTO 1490
1630 LOCATE 21,5:PRINT "                                ";
1640 LOCATE 21,5:PRINT "ENTER SELECTION ==>";
1650 IF INKEY$ <> "" THEN 1650
1660 CMD$=INKEY$:IF CMD$="" THEN 1660
1670 IF CMD$=CHR$(27)  THEN 1850
1680 IF CMD$="A" OR CMD$="a" THEN S$= "MARCH ":RESTORE 4000:GOTO 1770
1690 IF CMD$="B" OR CMD$="b" THEN S$= "STARS ":RESTORE 4100:GOTO 1770
1700 IF CMD$="C" OR CMD$="c" THEN S$= "FORTY ":RESTORE 3700:GOTO 1770
1710 IF CMD$="D" OR CMD$="d" THEN S$= "HAT   ":RESTORE 4300:GOTO 1770
1720 IF CMD$="E" OR CMD$="e" THEN S$= "HUMOR ":RESTORE 3500:GOTO 1770
1730 IF CMD$="F" OR CMD$="f" THEN S$= "BUG   ":RESTORE 3200:GOTO 1770
1740 IF CMD$="G" OR CMD$="g" THEN S$= "POP   ":RESTORE 3600:GOTO 1770
1750 IF CMD$="H" OR CMD$="h" THEN S$= "DANDY ":RESTORE 3900:GOTO 1770
1755 IF CMD$="I" OR CMD$="i" THEN S$= "SAKURA":RESTORE 4500:GOTO 1770
1757 IF CMD$="J" OR CMD$="j" THEN S$= "BLUE  ":RESTORE 3300:GOTO 1770
1761 IF CMD$="K" OR CMD$="k" THEN S$= "SCALES":RESTORE 4400:GOTO 1770
1769 GOTO 1640
1770 PRINT " ";CMD$;"-";S$
1780 READ D
1800 READ S$:LOCATE 23,1+(40.5-LEN(S$))/2
1805 COLOR 15,4:PRINT S$;:COLOR 0,7
1810 GOSUB 1490
1820 S$=STRING$(39," ")
1821 LOCATE 23,1
1823 COLOR 4,1:PRINT S$:COLOR 0,7
1830 GOTO 1630
1840 END
1850 IF SAMPLES$="YES" THEN CHAIN "SAMPLES",1000
1860 SCREEN 0,1:COLOR 7,0,0:CLS:END
3000 REM The IBM Personal Computer Music Scroll
3010 REM Version 1.00 (C)Copyright IBM Corp 1981
3020 REM Licensed Material - Program Property of IBM
3200 DATA -2,"La Cucaracha - Mexican Folk Song"
3210 DATA 42,1,0,1,42,1,0,1,42,1,0,1,47,1,0,5,51,1,0,3,42,1,0,1,42,1,0,1
3220 DATA 42,1,0,1,47,1,0,5,51,1,0,5,30,1,0,1,30,1,0,1,35,1,0,3,47,1,0,1
3230 DATA 47,1,0,1,46,1,0,1,46,1,0,1,44,1,0,1,44,1,0,1,42,8,0,2,42,1,0,1
3240 DATA 42,1,0,1,42,1,0,1,46,1,0,5,49,1,0,3,42,1,0,1,42,1,0,1,42,1,0,1
3250 DATA 46,1,0,5,49,1,0,5,37,1,0,1,37,1,0,1,30,1,0,3,54,2,56,2,54,2,52,2
3260 DATA 51,2,49,2,47,8
3270 DATA -1,-1
3300 DATA -2,"Blue Danube Waltz by J.S.Strauss"
3310 DATA 42,4,46,4,49,4,49,4,0,4,61,2,0,2,61,2,0,6,58,2,0,2,58,2,0,6,42,4,42,4
3320 DATA 46,4,49,4
3330 DATA 49,4,0,4,61,2,0,2,61,2,0,6,59,2,0,2,59,2,0,6,41,4,41,4,44,4,51,4,51,4
3340 DATA 0,4,63,2,0,2,63,2,0,6,59,2,0,2
3350 DATA 59,2,0,6,41,4,41,4,44,4,51,4,51,4,0,4,63,2,0,2,63,2,0,6,58,2,0,2,58,2
3360 DATA 0,6,42,4
3370 DATA 42,4,46,4,49,4,54,4,0,4,66,2,0,2,66,2,0,6,61,2,0,2,61,2,0,6,42,4
3380 DATA 42,4,46,4,49,4,54,4,0,4,66,2,0,2
3390 DATA 66,2,0,6,63,2,0,2,63,2,0,6,44,4,44,4,47,4,51,2,0,2,51,14,0,2,48,4
3400 DATA 49,4,58,16
3410 DATA 54,4,46,4,46,8,44,4,51,8,49,4,42,4,0,2,42,2,42,4,0,8,49,2,0,2,47,2
3420 DATA 0,6,49,2,0,2
3430 DATA 47,2,0,6,49,4,58,16,56,4,49,2,0,2,46,2,0,6,49,2,0,2,46,2,0,6,49,4
3440 DATA 56,16,54,4,49,2,0,2,47,2,0,6,49,2,0,2,47,2,0,6,49,4,58,16
3450 DATA 56,4,49,4,54,4,56,4,58,4,61,8,59,4,58,2,58,2,58,4,56,2,0,2,54,4,0,8
3460 DATA -1,-1
3500 DATA -2,"Humoresque by Dvorak"
3510 DATA 47,3,0,2,49,1,47,3,0,2,49,1,51,3,0,2,54,1,56,3,0,2,54,1
3520 DATA 59,3,0,2,58,1,61,3,0,2,59,1,58,3,0,2,61,1,59,3,0,2,56,1
3530 DATA 54,3,0,2,54,1,56,3,0,2,54,1,59,3,0,2,56,1,54,3,0,2,51,1
3540 DATA 49,24,47,3,0,2,49,1,47,3,0,2,49,1,51,3,0,2,54,1,56,3,0,2,54,1
3550 DATA 56,3,0,2,58,1,61,3,0,2,59,1,58,3,0,2,61,1,59,3,0,2,56,1
3560 DATA 54,3,0,2,54,1,59,3,0,2,47,1,49,6,54,6,47,18
3570 DATA -1,-1
3600 DATA -2,"Pop! Goes the Weasle - Anonymous"
3610 DATA 47,2,0,2,47,2,49,2,0,2,49,2,51,2,54,2,51,2,47,2,0,2,42,2
3620 DATA 47,2,0,2,47,2,49,2,0,2,49,2,51,6,47,2,0,2,42,2,47,2,0,2,47,2,49,2
3630 DATA 0,2,49,2,51,2,54,2,51,2,47,2,0,4,56,2,0,4,49,2,0,2,52,2,51,6,47,2
3640 DATA 0,4,59,2,0,2,59,2,56,2,0,2,59,2,58,2,61,2,58,2,54,2,0,4,59,2,0,2
3650 DATA 59,2,56,2,0,2,59,2,58,6,54,2,0,2,51,2,52,2,0,2,51,2,52,2,0,2,54,2
3660 DATA 56,2,0,2,58,2,59,2,0,4,56,2,0,4,49,2,0,2,52,2,51,6,47,2
3670 DATA -1,-1
3700    DATA -2,"Symphony #40 by Mozart"
3710 DATA 55,2,54,2,54,4,55,2,54,2,54,4,55,2,54,2,54,4,62,4,0,4
3720 DATA 62,2,61,2,59,4,59,2,57,2,55,4,55,2,54,2
3730 DATA 52,4,52,4,0,4,54,2,52,2,52,4,54,2,52,2,52,4,54,2,52,2
3740 DATA 52,4,61,4,0,4,61,2,59,2,58,4,58,2,55,2,54,4,54,2,52,2
3750 DATA 50,4,50,4,0,4,62,2,61,2,61,4,64,4,58,4,61,4
3760 DATA 59,4,54,4,0,4,62,2,61,2,61,4,64,4,58,4,61,4
3770 DATA 59,4,62,4,61,2,59,2,57,2,55,2,54,4,46,4,47,4,49,4
3780 DATA 50,4,52,2,50,2,49,4,47,4,54,4,0,4,64,8
3790 DATA 65,2,0,6,64,8,65,2,0,6,64,8
3800 DATA 65,4,64,4,65,4,64,4,65,4
3810 DATA -1,-1
3900 DATA -2,"Yankee Doodle - Anonymous "
3910 DATA 50,3,50,3,52,3,54,3,50,3,54,3,52,3,45,3,50,3,50,3,52,3,54,3,50,6
3920 DATA 49,3,0,3
3930 DATA 50,3,50,3,52,3,54,3,55,3,54,3,52,3,50,3,49,3,45,3,47,3,49,3,50,6
3940 DATA 50,3,0,3
3950 DATA 47,5,49,1,47,3,45,3,47,3,49,3,50,3,0,3,45,5,47,1,45,3,43,3,42,6
3960 DATA 45,3,0,3
3970 DATA 47,5,49,1,47,3,45,3,47,3,49,3,50,3,47,3,45,3,50,3,49,3,52,3,50,6
3980 DATA 50,6
3990 DATA -1,-1
4000 DATA -2,"FUNERAL MARCH OF A MARIONETTE - GOUNOD"
4010 DATA 37,1,0,2,30,1,0,5,42,3,42,3,41,3,39,3,41,3,0,3,42,3,44,3,0,3,37,1,0,2
4020 DATA 30,1,0,5,42,3,42,3,41,3,39,3,41,3,0,3,42,3,44,3,0,3,37,3,42,3,0,3,45,3
4030 DATA 49,6,47,3,45,3,0,3,49,3,52,6,50,3,49,3,0,3,53,3,56,6,54,3,53,3,50,3
4040 DATA 49,3,47,3,45,3,44,3,30,1,0,5,42,3,42,3,41,3,39,3,41,3,0,3,42,3,44,3
4050 DATA 0,3,37,1,0,2,30,1,0,5,42,3,42,3,41,3,39,3,41,3,0,3,42,3,44,3,0,3
4060 DATA 37,3,45,3,0,3,49,3,52,6,50,3,49,3,47,3,45,3,43,3,47,3,50,3,42,3
4070 DATA 41,3,42,3,44,3,0,3,45,1,0,2,44,9,42,1
4080 DATA -1,-1
4100 DATA -2,"STARS AND STRIPES FOREVER - SOUSA "
4110 DATA 54,6,54,6,52,3,51,3,51,6,50,3,51,3,51,16,0,2,50,3
4120 DATA 51,3,51,6,50,3,51,3
4130 DATA 54,6,51,3,54,3,52,12,49,6,0,3,49,3,49,6,48,3,49,3
4140 DATA 49,6,48,3,49,3
4150 DATA 52,16,0,2,51,3,49,3,51,3,54,9,56,9,56,3,49,16,0,2,54,6
4160 DATA 54,6,52,3,51,3,51,6,50,3,51,3,51,16,0,2,50,3,51,3,51,6,50,3 ,51,3
4170 DATA 52,3,51,3,49,5,46,1,49,12,47,6,0,3,47,3,47,6,46,3,47,3,50,6,49,3,47,3
4180 DATA 59,15,0,3,47,3,49,3,51,3,54,1,0,2,47,3,49,3,51,3,54,1,0,2,42,3,44,5
4190 DATA 51,1,49,12,47,1
4200 DATA -1,-1
4300 DATA -2,"Mexican Hat Dance - Traditional "
4310 DATA 52,2,57,2,0,2,52,2,57,2,0,2,52,2,57,6,0,4,52,2,57,2,59,2,57,2,56,4
4320 DATA 57,2,59,2,0,8,52,2,56,2,0,2,52,2,56,2,0,2,52,2,56,6,0,4,52,2
4330 DATA 56,2,57,2,56,2,54,4,56,2,57,2,0,6,64,2,63,2,64,2,61,2,60,2,61,2
4340 DATA 57,2,56,2,57,2,52,2,0,4,49,2,50,2,52,2,54,2,56,2,57,2,59,2,61,2
4350 DATA 62,2,59,2,0,4,62,2,61,2,62,2,59,2,58,2,59,2,56,2,55,2,56,2,52,2
4360 DATA 0,4,64,2,63,2,64,2,66,2,64,2,62,2,61,2,59,2,57,2
4370 DATA -1,-1
4400 DATA -2,"SCALES                          "
4410 DATA 38,1,39,1,40,1,41,1,42,1,43,1,44,1,45,1,46,1,47,1
4420 DATA 48,1,49,1,50,1,51,1,52,1,53,1,54,1,55,1,56,1
4430 DATA 57,1,58,1,59,1,60,1,61,1,62,1,63,1,64,1,65,8,0,4
4440 DATA 65,8,64,1,63,1,62,1,61,1,60,1,59,1,58,1,57,1
4450 DATA 56,1,55,1,54,1,53,1,52,1,51,1,50,1,49,1,48,1
4460 DATA 47,1,46,1,45,1,44,1,43,1,42,1,41,1,40,1,39,1,38,8
4470 DATA -1,-1
4500 DATA -2,"Sakura - Japanese Folk Melody "
4510 DATA 49,8,49,8,51,12,0,4,49,8,49,8,51,12,0,4,49,8,51,8,52,8,51,8
4520 DATA 49,8,51,4,49,4,45,16,44,8,40,8,44,8,45,8
4530 DATA 44,8,44,4,40,4,39,16,49,8,49,8,51,12,0,4,49,8,49,8,51,12,0,4
4540 DATA 40,8,44,8,45,8,49,8,51,4,49,4,45,8,44,16
4550 DATA -1,-1
